﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="questions.aspx.cs" Inherits="manager_user" ValidateRequest="false" %>

<%@ Register assembly="FreeTextBox" namespace="FreeTextBoxControls" tagprefix="FTB" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Questions</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />    
    <link rel="stylesheet" type="text/css" href="../css/manager.css"/>
</head>
<body>
    <form runat="server">
        <div id="layout_infor" runat="server">
            <table border="0" cellspacing="5" style="font-size:18px">
                <tr>
                    <td width="150px">Questions code</td>
                    <td>
                        <asp:TextBox ID="txt_quescode" class="input_text_view" runat="server" MaxLength="10"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>Type</td>
                    <td>
                        <div class="input_text_view">
                            <asp:DropDownList ID="ddl_type" runat="server" style="border:0;font-size:18px;width:387px;margin-top:2px;padding:10px 0 8px 0">
                                <asp:ListItem>-- Select once --</asp:ListItem>
                                <asp:ListItem>General Knowledge</asp:ListItem>
                                <asp:ListItem>Mathematics</asp:ListItem>
                                <asp:ListItem>Computer Technology</asp:ListItem>
                            </asp:DropDownList>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>Answer</td>
                    <td>
                        <asp:RadioButton ID="rdb_a" GroupName="gnAnswer" runat="server" Text="A" style="padding:0 10px 0 10px" />
                        <asp:RadioButton ID="rdb_b" GroupName="gnAnswer" runat="server" Text="B" style="padding-right:10px" />
                        <asp:RadioButton ID="rdb_c" GroupName="gnAnswer" runat="server" Text="C" style="padding-right:10px" />
                        <asp:RadioButton ID="rdb_d" GroupName="gnAnswer" runat="server" Text="D" />
                    </td>
                </tr>
                <tr>
                    <td valign="top">Content</td>
                    <td>
                        <FTB:FreeTextBox ID="ftb_content" runat="server" ButtonSet="OfficeMac" Width="100%" Height="250px">
                        </FTB:FreeTextBox>
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td>
                        <asp:Button ID="btn_save" class="btnWhite" runat="server" Text="Save" onclick="btn_save_Click" />                     	        
                    	<asp:Button ID="btn_reset" class="btnWhite" runat="server" Text="Reset" onclick="btn_reset_Click" />
                    	<asp:Button ID="btn_edit" class="btnWhite" runat="server" Text="Edit" Visible="false" onclick="btn_edit_Click" /> 
                    	<asp:Button ID="btn_back" class="btnWhite" runat="server" Text="Back" onclick="btn_back_Click" />
                        <div style="font-size:15px;color:#F00;padding-top:10px"><b><asp:Label ID="lbl_msg" runat="server" Text=""></asp:Label></b></div>
                    </td>
                </tr>
            </table>            
        </div>
        
        <div id="layout_gridview" style="padding:10px;margin:0 0 60px 0" runat="server">
            <div style="height:50px">
                <div style="float:left">
                    <asp:Button ID="btn_add" class="btnGreen" runat="server" Text="Add" onclick="btn_add_Click" /> 
                    <asp:Button ID="btn_del" class="btnRed" runat="server" Text="Delete" onclick="btn_del_Click" />
                    <asp:Button ID="btn_refresh" class="btnWhite" runat="server" Text="Refresh" onclick="btn_refresh_Click" />
                </div>
                <div style="float:right">
                    <asp:TextBox ID="txt_search" class="input_text_view" runat="server"></asp:TextBox>
                    <asp:Button ID="btn_search" class="btnWhite" runat="server" Text="Search" onclick="btn_search_Click" /> 
                </div>                 
            </div>
            <div style="font-size:15px;color:#F00;padding-top:10px;text-align:center"><b><asp:Label ID="lbl_not_data" runat="server" Text=""></asp:Label></b></div>
            <asp:GridView ID="mGridView" style="border:1px solid #a9a9a9" runat="server" 
                Width="100%" AutoGenerateColumns="False" BackColor="White" BorderColor="Black" 
                BorderStyle="None" BorderWidth="1px" CellPadding="5" AllowPaging="True" 
                AllowSorting="True" PageSize="10" onselectedindexchanged="mGridView_SelectedIndexChanged" onpageindexchanging="mGridView_PageIndexChanging">
                <FooterStyle BackColor="White" ForeColor="#000066" />
                <Columns>
                    <asp:TemplateField HeaderText="Select">
                        <ItemTemplate>
                            <input type="checkbox" id="chk" runat="server" value='<%#Eval("quesCode") %>' />
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" Width="50px" />
                    </asp:TemplateField>
                    <asp:BoundField DataField="quesCode" HeaderText="QuesCode" >
                        <ItemStyle Width="80px" />
                    </asp:BoundField>
                    <asp:TemplateField HeaderText="Content">
                        <ItemTemplate>
                            <%#Eval("content") %>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="answer" HeaderText="Answer" >
                        <ItemStyle Width="50px" HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:BoundField DataField="type" HeaderText="Type" >
                        <ItemStyle Width="130px" />
                    </asp:BoundField>
                    <asp:CommandField HeaderText="Edit" SelectText="Edit" ShowSelectButton="True">
                        <ItemStyle HorizontalAlign="Center" Width="50px" />
                    </asp:CommandField>
                </Columns>
                <RowStyle ForeColor="#000066" />
                <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                <HeaderStyle BackColor="#05ADEE" Font-Bold="True" ForeColor="White" />
            </asp:GridView>        
        </div>
    
    </form>
</body>
</html>
